package com.zkhz.base.domian.vo;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zkhz.base.common.dto.PageDTO;
import com.zkhz.base.domian.entity.MyUser;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 用户分页查询条件
 * @param <T> 用户表实体类
 */
@Data
public class MyUserPageVO<T> extends PageDTO<T> {
    @ApiModelProperty(value = "用户名")
    private String username;
    @ApiModelProperty(value = "名称")
    private String name;
    @ApiModelProperty(value = "年龄")
    private Integer age;

    public Page<?> buildPage() {
        Page<?> page = new Page<>(this.getPageNum(), this.getPageSize());
        return page;
    }

    public static void main(String[] args) {
        MyUserPageVO<MyUser> myUserPageVO = new MyUserPageVO<>();
        Page<MyUser> page = (Page<MyUser>) myUserPageVO.buildPage();
    }
}
